#include<iostream>
#include<string>

int main()
{
    using namespace std;
    string empty;
    string small="this is a bit!!!!!";
    string larger="elephants are a boy's best friends";
    //将larger容量扩大8倍。
    for (int i = 0; i <3; i++)
    {
        larger+=larger;
    }
    cout<<"Size:";
    cout<<"\tempty:"<<empty.size()<<endl;
    cout<<"\tsmall:"<<small.size()<<endl;
    cout<<"\tlarger:"<<larger.size()<<endl;
    cout<<"capacities:\n";
    cout<<"\tempty:"<<empty.capacity()<<endl;
    cout<<"\tsmall:"<<small.capacity()<<endl;
    cout<<"\tlarger:"<<larger.capacity()<<endl;
    empty.reserve(50);
    cout<<"capacity after empty.reverse(50):"
            <<empty.capacity()<<endl;
    return 0;
}